home *** CD-ROM | disk | FTP | other *** search
- Path: surfnet.nl!sun4nl!xs4all!usenet
- From: brooz@xs4all.nl (Bart Roozendaal)
- Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.misc
- Subject: Using class members from DLL
- Date: Tue, 05 Mar 1996 16:24:27 GMT
- Organization: ROOS
- Message-ID: <313c67e1.4039445@news>
- NNTP-Posting-Host: asd05-03.dial.xs4all.nl
- X-Newsreader: Forte Agent .99d/32.182
-
- Hi,
-
- Using Microsoft Visual C++, version 1.5 I am looking a way to use a
- class stored in a DLL. How can I get access to the members of a class
- defined in a DLL from a program? Example:
-
- // This is in a DLL
- class CTestList : public CListBox
- {
- public:
- BOOL IsValid();
- };
-
- // This is in a program
- ...
- CTestList *test = new CTestList; // How to access the constructor
- if (test->IsValid()) {
- ...
- }
-
- Now, the problem is that I can't get the compiler find the public
- IsValid-member of the class. How do I export this 'function'? Do I
- have to use a different prototyping of the class? How can I get this
- working? I don't want to be writing C-code and use that as an
- interface to the class...
-
- I hope this is clear enough. Help would be greatly appreciated.
-
- Bye, Bart.
- P.S. If you can, please reply through emai.
- +---------------------------------------------+
- | B. Roozendaal (ROOS) |
- | brooz@xs4all.nl, home: www.xs4all.nl/~brooz |
- | De een is de ander niet, |
- | en morgen is er weer een dag... |
- +---------------------------------------------+
-